#pragma once

#include "storage_strategy.h"

#include <mutex>

namespace fusion_perception {

class MsgLatestStorageStrategy : public StorageStrategy {
public:
    MsgLatestStorageStrategy(int64_t nsThreshold);

    void push(ObjectSptrVector msg);
    ObjectSptrVector take(int64_t microTs);

private:
    int64_t microThreshold_;
    std::mutex mutexLock_;
    ObjectSptrVector msg_;
};
}